package com.cybertron.ironhide.manage.service.impl;

import java.util.Date;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.cybertron.ironhide.manage.common.base.Pager;
import com.cybertron.ironhide.manage.domain.PopularCate;
import com.cybertron.ironhide.manage.persistence.PopularCateMapper;
import com.cybertron.ironhide.manage.service.PopularCateService;
import com.cybertron.ironhide.manage.util.CommonUtil;

@Service
public class PopularCateServiceImpl implements PopularCateService {

	@Resource
	private PopularCateMapper popularCateMapper;

	@Override
	public List<PopularCate> selectBySelective(PopularCate record, Pager pager) {
		return popularCateMapper.selectBySelective(record, pager);
	}

	@Override
	public void insertSelective(PopularCate record) {
		record.setId(CommonUtil.getUUID());
		record.setCreateDate(new Date());
		record.setModifyDate(new Date());
		popularCateMapper.insertSelective(record);
	}

	@Override
	public void updateByPrimaryKeySelective(PopularCate record) {
		record.setModifyDate(new Date());
		popularCateMapper.updateByPrimaryKeySelective(record);
	}

	@Override
	public void deleteByPrimaryKey(String id) {
		popularCateMapper.deleteByPrimaryKey(id);
	}

	@Override
	public PopularCate selectByCateId(String cateId) {
		return popularCateMapper.selectByCateId(cateId);
	}

	@Override
	public PopularCate selectByPrimaryKey(String id) {
		return popularCateMapper.selectByPrimaryKey(id);
	}

	@Override
	public List<PopularCate> selectByIndex() {
		return popularCateMapper.selectByIndex();
	}

}
